package com.bw.controller;

import com.bw.Service.VoService;
import com.bw.bean.Shop;
import com.bw.bean.Vo;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: lhy
 * @Date: 2025/3/12 09:07
 * @Description:
 **/
@RestController
public class VoController {
    @Autowired
    VoService voService;

    @RequestMapping("List1")
    public Map getList1(){
        double val=voService.getList1();
        return SugarUtil.getFlipNumberData(val);
    }
    @RequestMapping("List2")
    public Map getList2(){
        List<Vo> list =voService.getList2();
        return SugarUtil.getPieData(list);
    }
    @RequestMapping("List3")
    public Map getList3(){
        List<Vo> list =voService.getList3();
        return SugarUtil.getMapData(list);
    }
    @RequestMapping("List4")
    public List<Shop> getList4(){

        return voService.getList4();
    }
    @RequestMapping("List5")
    public List<Vo> getList5(){

        return voService.getList5();
    }
    @RequestMapping("List6")
    public List<Vo> getList6(){

        return voService.getList6();
    }

}
